home *** CD-ROM | disk | FTP | other *** search
/ MacAdvocate 2 / apple-mac-advocate-ii-fall-1997.iso / mac / MacOS / Other Installers / LaserWriter 8.4.1 Installer / LaserWriter Disk 1 / PL.CommonRsrc / PL.CommonRsrc.rsrc / PS_-8178 < prev    next >
Encoding:
Text File  |  1996-09-10  |  1.7 KB  |  150 lines

  1. %%BeginFile: lw8_level1_basicimages-2.0
  2. /$i F def
  3. /flipinvert
  4. statusdict begin
  5. version cvr 47.0 lt
  6. end
  7. def
  8. /iw Z
  9. /ih Z
  10. /im_save Z
  11. /setupimageproc Z
  12. /polarity Z
  13. /smoothflag Z
  14. /$z Z
  15. /bpc Z
  16. /smooth_moredata Z
  17. /datatype Z
  18. /xtraData Z
  19. /:f
  20. {
  21. /im_save save store
  22. /xtraData xs
  23. /datatype xs
  24. $i flipinvert
  25. and
  26. xor
  27. /polarity xs
  28. /smoothflag xs
  29. dup aload pop
  30. transform
  31. round 0.5 sub exch
  32. round 0.5 sub exch
  33. itransform
  34. 7 -1 roll astore
  35. concat
  36. xtraData
  37. {
  38. 0 0 1 1
  39. 1 1 idtransform abs exch pop
  40. add
  41. rC
  42. }if
  43. /$z exch string store
  44. /bpc xs
  45. xtraData{4 add}if
  46. /ih xs
  47. /iw xs
  48. /smoothflag
  49. smoothflag
  50. bpc 1 eq and
  51. smoothflag and
  52. userdict/sc_smooth known and
  53. vmstatus pop exch pop iw 3 mul sub 1000 gt and
  54. iw 4 mul 7 add 8 idiv 4 mul 65535 le and
  55. store
  56. smoothflag{
  57. iw
  58. ih
  59. $z
  60. iw 7 add 8 idiv 4 mul string
  61. iw 4 mul 7 add 8 idiv 4 mul string
  62. T
  63. F
  64. sc_initsmooth
  65. /iw iw 4 mul store
  66. /ih ih 4 mul store
  67. }if
  68. /setupimageproc datatype 0 eq datatype 1 eq or{
  69. smoothflag{
  70. {
  71. [
  72. /smooth_moredata cvx[
  73. currentfile
  74. $z
  75. {readstring readhexstring}datatype get
  76. /pop cvx
  77. ]cvx[
  78. $z
  79. ]cvx/ifelse cvx
  80. /sc_smooth cvx
  81. /smooth_moredata/exch cvx/store cvx
  82. ]cvx bind
  83. /smooth_moredata T store
  84. dup exec pop dup exec pop
  85. }
  86. }{
  87. {
  88. [
  89. currentfile
  90. $z
  91. {readstring readhexstring}datatype get
  92. /pop cvx
  93. ]cvx bind
  94. }
  95. }ifelse
  96. }{
  97. (error, can't use level2 data acquisition procs for level1)print flush stop
  98. }ifelse
  99. store
  100. }bd
  101. /mkimgmtx
  102. {
  103. xtraData
  104. {
  105. smoothflag
  106. {
  107. [iw 0 0 ih 16 sub 0 8]
  108. }{
  109. [iw 0 0 ih 4 sub 0 2]
  110. }ifelse
  111. }{
  112. [iw 0 0 ih 0 0]
  113. }ifelse
  114. }bd
  115. /do1img
  116. {
  117. iw ih
  118. polarity
  119. mkimgmtx
  120. setupimageproc
  121. imagemask
  122. }bd
  123. /:j{im_save restore}bd
  124. /:g
  125. {
  126. 1 setgray
  127. 0
  128. 1 1 idtransform abs exch pop
  129. 1 1
  130. rF
  131. 0 setgray
  132. do1img
  133. }bd
  134. /:h
  135. {
  136. :Fx
  137. 0
  138. 1 1 idtransform abs exch pop
  139. 1 1
  140. rF
  141. :Fx
  142. do1img
  143. }bd
  144. /:i
  145. {
  146. :Fx
  147. do1img
  148. }bd
  149. %%EndFile
  150.